package com.z996;

import com.z996.bean.AnotationApplicationContext;
import com.z996.bean.ApplicationContext;
import com.z996.service.UserService;
import org.junit.jupiter.api.Test;

public class SpringIocTest {

    @Test
    public void testIoc() throws Exception {
        ApplicationContext applicationContext = new AnotationApplicationContext("com.z996");
        UserService userService = (UserService)applicationContext.getBean(UserService.class);
        userService.out();
        System.out.println("run success");
    }
}